WRAPMODE_NONE,//no clipping of any kind is done to the anchor
WRAPMODE_CLIP,
WRAPMODE_WRAP
} SCROLLERWRAPMODE;
//world space/screen space management class
class CScroller
{
private:
//screen space
RECT rcScreenSpace;
//world space
RECT rcWorldSpace;
//anchor space
RECT rcAnchorSpace;
//anchor
POINT ptScreenAnchor;
//wrapmodes
SCROLLERWRAPMODE swmHorizontal;
SCROLLERWRAPMODE swmVertical;
public:
//constructor
CScroller();
//destructor
~CScroller();
//screen space
RECT* GetScreenSpace();
void SetScreenSpace(RECT* prcNewScreenSpace);
void AdjustScreenSpace(int iLeftAdjust,int iTopAdjust,int iRightAdjust, int iBottomAdjust);
int GetScreenSpaceWidth();
int GetScreenSpaceHeight();
//world space
RECT* GetWorldSpace();
void SetWorldSpace(RECT* prcNewWorldSpace);
void AdjustWorldSpace(int iLeftAdjust,int iTopAdjust,int iRightAdjust, int iBottomAdjust);
int GetWorldSpaceWidth();
int GetWorldSpaceHeight();
void CalcWorldSpace(CTilePlotter* TilePlotter,RECT* prcExtent,int iMapWidth,int iMapHeight);//calculates worldspace based on a tile plotter, a tile extent rectangle, and a map's height and width
//anchor space
RECT* GetAnchorSpace();
void SetAnchorSpace(RECT* prcNewAnchorSpace);
void AdjustAnchorSpace(int iLeftAdjust,int iTopAdjust,int iRightAdjust, int iBottomAdjust);
int GetAnchorSpaceWidth();
int GetAnchorSpaceHeight();
void CalcAnchorSpace();//calculates anchor space based on world space and screen space